package com.itheima.mapper.admin;

import com.itheima.admin.orderpojo.Order;
import com.itheima.admin.orderpojo.vo.OrderQueryVo;
import com.itheima.admin.orderpojo.vo.OrderStatusVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wuzhiyong
 */
@Mapper
public interface OrderMapper {

    /**
     * 分页
     *
     * @param orderQueryVo orderQueryVo
     * @return List<Order>
     */
    List<Order> selectPageOrder(OrderQueryVo orderQueryVo);

    /**
     * 分页-总条数
     *
     * @return 条数
     */
    @Select("select count(*)from admin_order")
    int selectAllOrder();

    /**
     * 修改状态
     * @param orderStatusVo orderStatusVo
     * @return 条数
     */
    int updateStatusById(OrderStatusVo orderStatusVo);
}
